#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright [Gtlions Lai].
# Create Date:
# Update Date:
"""summarization ahout this script.

detail ahout this script

   Class(): summarization about Class
   ...
   function(): summarization about function
   ...
"""
__authors__ = '"Gtlions Lai" <gtlions.l@qq.com>'

import time
import thread
from time import ctime


def timer(i, interval):
    while True:
        ts = "Thread:(" + str(i) + ")-" + str(interval)
        print ts, ctime()
        time.sleep(interval)


def test():
    thread.start_new_thread(timer, (1, 2))


if __name__ == '__main__':
    test()
    time.sleep(20)
    print "main thread exit...\n"
